package com.wjc.train.business.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.wjc.train.business.req.DailyTrainSeatQueryReq;
import com.wjc.train.business.req.DailyTrainSeatSaveReq;
import com.wjc.train.business.req.SeatSellReq;
import com.wjc.train.business.resp.DailyTrainSeatQueryResp;
import com.wjc.train.business.resp.SeatSellResp;

import java.util.Date;
import java.util.List;

/**
 * <p>
 * 每日座位表 服务类
 * </p>
 *
 * @author Guessed
 * @since 2023-08-08
 */
public interface IDailyTrainSeatService  {

  /**
     * 保存或修改
     * @param dailytrainseatSaveReq
     */
    void save(DailyTrainSeatSaveReq dailytrainseatSaveReq);

    /**
     * 分页查询
     * @param page
     * @param dailytrainseatQueryReq
     * @return
     */
    IPage<DailyTrainSeatQueryResp> queryList(IPage<DailyTrainSeatQueryResp> page, DailyTrainSeatQueryReq dailytrainseatQueryReq);

    /**
     * 删除
     * @param id
     */
    void delete(Long id);

  /**
   * 生成每日车座信息
   */
  void genDaily(Date date, String trainCode);

  int countSeat(Date date, String trainCode,String seatType);

  int countSeat(Date date, String trainCode);

  /**
   * 查询车次售卖情况
   * @param req
   * @return
   */
  List<SeatSellResp> querySeatSell(SeatSellReq req);
}
